package org.deltaset.meta.internal;

/**
 *
 * @author dmakariev
 */
public class MetaFieldImpl {

    private final String id;
    private final MetaClassImpl parentMetaClass;
    private final MetaClassImpl propertyMetaClass;
    private final String propertyName;
    private final int max;
    private final int min;
    private final boolean isEmpty;

    public MetaFieldImpl(
            String id,
            MetaClassImpl parentMetaClass,
            MetaClassImpl propertyMetaClass,
            String propertyName,
            int max,
            int min,
            boolean isEmpty) {
        this.id = id;
        this.parentMetaClass = parentMetaClass;
        this.propertyMetaClass = propertyMetaClass;
        this.propertyName = propertyName;
        this.max = max;
        this.min = min;
        this.isEmpty = isEmpty;
    }

    public boolean isEmpty() {
        return isEmpty;
    }

    public String getId() {
        return id;
    }

    public int getMax() {
        return max;
    }

    public int getMin() {
        return min;
    }

    public MetaClassImpl getParentMetaClass() {
        return parentMetaClass;
    }

    public String getPropertyName() {
        return propertyName;
    }

    public String getPropertyType() {
        return propertyMetaClass.getOriginalType();
    }

    public MetaClassImpl getPropertyMetaClass() {
        return propertyMetaClass;
    }
}
